# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=beleth
pkgver=36.0963699
pkgrel=1
groups=('blackarch' 'blackarch-cracker')
pkgdesc='A Multi-threaded Dictionary based SSH cracker.'
url='https://github.com/chokepoint/Beleth'
arch=('x86_64' 'aarch64')
license=('custom')
depends=('libssh2')
makedepends=('git')
source=("$pkgname::git+https://github.com/chokepoint/Beleth.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build(){
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 wordlist.txt "$pkgdir/usr/share/$pkgname/wordlist.txt"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
}

